package com.xy.modular.sys.entity;

import com.xy.framework.base.entity.Entity;

import java.util.List;

/**
 * <p>
 * 菜单表
 * </p>
 *
 * @author BCK
 * @since 2019-12-15
 */
public class Menu extends Entity {

    private static final long serialVersionUID = 1L;

    /**
     * 父级菜单
     */
    private Integer parentId;
    /**
     * 菜单编号
     */
    private String code;
    /**
     * 菜单名称
     */
    private String name;
    /**
     * 菜单别名
     */
    private String alias;
    /**
     * 请求地址
     */
    private String path;
    /**
     * 菜单资源
     */
    private String source;
    /**
     * 排序
     */
    private Integer sort;
    /**
     * 菜单类型
     */
    private Integer category;
    /**
     * 操作按钮类型
     */
    private Integer action;
    /**
     * 是否打开新页面
     */
    private Integer isOpen;
    /**
     * 备注
     */
    private String remark;
    /**
     * 是否已删除
     */
    private Integer isDeleted;

    private List<Menu> children;
    public List<Menu> getChildren() {
        return children;
    }
    public void setChildren(List<Menu> children) {
        this.children = children;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }
    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }
    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }
    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }
    public Integer getCategory() {
        return category;
    }

    public void setCategory(Integer category) {
        this.category = category;
    }
    public Integer getAction() {
        return action;
    }

    public void setAction(Integer action) {
        this.action = action;
    }
    public Integer getIsOpen() {
        return isOpen;
    }

    public void setIsOpen(Integer isOpen) {
        this.isOpen = isOpen;
    }
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public static final String PARENT_ID = "sys_menu.parent_id";
    public static final String CODE = "sys_menu.code";
    public static final String NAME = "sys_menu.name";
    public static final String ALIAS = "sys_menu.alias";
    public static final String PATH = "sys_menu.path";
    public static final String SOURCE = "sys_menu.source";
    public static final String SORT = "sys_menu.sort";
    public static final String CATEGORY = "sys_menu.category";
    public static final String ACTION = "sys_menu.action";
    public static final String IS_OPEN = "sys_menu.is_open";
    public static final String REMARK = "sys_menu.remark";
    public static final String IS_DELETED = "sys_menu.is_deleted";

    @Override
    public String toString() {
        return "Menu{" +
            "parentId=" + parentId +
            ", code=" + code +
            ", name=" + name +
            ", alias=" + alias +
            ", path=" + path +
            ", source=" + source +
            ", sort=" + sort +
            ", category=" + category +
            ", action=" + action +
            ", isOpen=" + isOpen +
            ", remark=" + remark +
            ", isDeleted=" + isDeleted +
        "}";
    }
}
